package dao

import "adam2/internal/model"

type Real9QuantAccountDao interface {
	// 查询所有记录
	FindAll() model.Real9QuantAccountArray

	// 更新real9_q_account表的hold_stock_number、stock_assets、total_assets字段
	UpdateBeforeSell(holdStockNumber int, stockAssets float64, accountName string)

	// 更新real9_q_account表的hold_stock_number、stock_assets、capital_assets、total_assets、total_stamp_duty、total_registrate_fee_when_sell、total_commission_when_sell字段
	UpdateAfterSell(sellOrBuyStockNumber int, stockAssets float64, real9QuantAccount model.Real9QuantAccount)

	// 清空表
	TruncateTable()

	// 根据日期，从real9_q_account_log表中向real9_q_account表中插入记录
	InsertFromReal9QuantAccountLogByDate(date string)
}
